//
//  ViewController.m
//  ZNChart
//
//  Created by Yim on 16/10/4.
//  Copyright © 2016年 ZN. All rights reserved.
//

#import "ViewController.h"
#import "ZNChartView.h"

@interface ViewController ()

@property (nonatomic, weak) ZNChartView *cview;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //    ZNYAxisView *view = [[ZNYAxisView alloc] init];
    //    view.frame = CGRectMake(0, 0, 50, self.view.bounds.size.height);
    //    view.xAxisTextGap = 10;
    //    view.topMargin = 50;
    //    view.backgroundColor = [UIColor greenColor];
    //    [self.view addSubview:view];
    
    NSArray *arrar = @[@"56",@"68",@"54",@"36",@"56",@"61",@"56",@"56",@"56",@"56"];
    NSArray *arrar1 = @[@"32",@"34",@"53",@"40",@"43",@"32",@"34",@"53",@"40",@"43"];
    NSArray *arrar3 = @[@"22",@"14",@"63",@"80",@"43",@"32",@"34",@"43",@"20",@"33"];
    NSMutableArray *ar = [NSMutableArray array];
    [ar addObjectsFromArray:arrar];
    [ar addObjectsFromArray:arrar1];
    [ar addObjectsFromArray:arrar3];
    
    ZNChartView *view = [[ZNChartView alloc] init];
    view.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height);
    view.yAxisMaxValue = 100;
    view.xAxisPercent = YES;
    view.points = arrar3;
    //    for (int i = 0; i; <#increment#>) {
    //        <#statements#>
    //    }
    view.pageView = 1;
    //    [view setSubView];
    [self.view addSubview:view];
    _cview = view;
    [self performSelector:@selector(changeValue) withObject:nil afterDelay:5.0];
}

-(void)changeValue
{
    //    _cview.pageView = 5;
    //    _cview.yAxisMaxValue = 100;
    //    _cview.points = @[@"56",@"58",@"56",@"56",@"56",@"61",@"56",@"56",@"56",@"56"];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
@end
